-
Notifications
You must be signed in to change notification settings - Fork 6
attempt to build mac app bundle #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the build.sh packaging pipeline to produce platform-specific build artifacts and adds an initial macOS .app bundle packaging step.
Changes:
- Refactors the build steps into per-platform functions (Windows/Linux/macOS).
- Adds macOS
.appbundle creation with an inlineInfo.plistand zips the bundle. - Adds explicit
dotnet restoresteps prior to building.
| mac_bundle_id="com.openloco.objecteditor" | ||
| macos_publish_dir="Gui/bin/Release/$framework/osx-x64/publish" | ||
| macos_bundle_dir="$macos_publish_dir/$app_name.app" | ||
| macos_plist_template="Gui/Packaging/macOS/Info.plist" |
Copilot
AI
Feb 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macos_plist_template points to Gui/Packaging/macOS/Info.plist, but that directory doesn’t exist in the repo and the variable is never used. Remove it or implement template-based plist generation to avoid dead/incorrect config.
| macos_plist_template="Gui/Packaging/macOS/Info.plist" |
| echo "Zipping ${FG_BLUE}linux-x64${RESET}" | ||
| pushd "Gui/bin/Release/$framework/linux-x64/publish" | ||
| chmod +x "./ObjectEditor" | ||
| chmod +x "./ObjectEditorUpdater" | ||
| touch "object-editor-$version-linux-x64.tar" | ||
| tar --exclude="object-editor-$version-linux-x64.tar" -jcf "object-editor-$version-linux-x64.tar" . | ||
| mv "object-editor-$version-linux-x64.tar" ../../.. |
Copilot
AI
Feb 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Linux artifact is created with tar -j (bzip2 compression) but is named *.tar and the log says "Zipping". This produces a misleading filename/content-type for consumers of the build output. Rename the output to *.tar.bz2 (or drop -j if you intend an uncompressed tar) and adjust the log message accordingly.
| echo "Zipping ${FG_BLUE}linux-x64${RESET}" | |
| pushd "Gui/bin/Release/$framework/linux-x64/publish" | |
| chmod +x "./ObjectEditor" | |
| chmod +x "./ObjectEditorUpdater" | |
| touch "object-editor-$version-linux-x64.tar" | |
| tar --exclude="object-editor-$version-linux-x64.tar" -jcf "object-editor-$version-linux-x64.tar" . | |
| mv "object-editor-$version-linux-x64.tar" ../../.. | |
| echo "Creating bzip2 tarball for ${FG_BLUE}linux-x64${RESET}" | |
| pushd "Gui/bin/Release/$framework/linux-x64/publish" | |
| chmod +x "./ObjectEditor" | |
| chmod +x "./ObjectEditorUpdater" | |
| touch "object-editor-$version-linux-x64.tar.bz2" | |
| tar --exclude="object-editor-$version-linux-x64.tar.bz2" -jcf "object-editor-$version-linux-x64.tar.bz2" . | |
| mv "object-editor-$version-linux-x64.tar.bz2" ../../.. |
| # Restore dependencies first to avoid race conditions during parallel builds | ||
| dotnet restore Gui/Gui.csproj | ||
| dotnet restore GuiUpdater/GuiUpdater.csproj | ||
|
|
||
| # 3. Build the editor for different platforms in parallel | ||
| build_windows | ||
| build_linux | ||
| build_macos |
Copilot
AI
Feb 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotnet restore is run explicitly, but dotnet publish will restore again unless --no-restore is passed. This adds unnecessary work and can significantly slow CI packaging. Add --no-restore to the publishes (or remove the explicit restores if you prefer publish-driven restores).
| <string>loco_icon.icns</string> | ||
| </dict> | ||
| </plist> | ||
| EOF | ||
|
|
||
| if [ -f "Gui/Assets/loco_icon.icns" ]; then | ||
| cp "Gui/Assets/loco_icon.icns" "$macos_bundle_dir/Contents/Resources/" |
Copilot
AI
Feb 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated Info.plist declares CFBundleIconFile as loco_icon.icns, but the repo doesn't contain Gui/Assets/loco_icon.icns (only .ico/.png). As written, the bundle will never include the icon you declare. Either add/generate an .icns during the build (e.g., from the PNG) or update the plist/icon copy logic to match an actual bundled icon file.
| <string>loco_icon.icns</string> | |
| </dict> | |
| </plist> | |
| EOF | |
| if [ -f "Gui/Assets/loco_icon.icns" ]; then | |
| cp "Gui/Assets/loco_icon.icns" "$macos_bundle_dir/Contents/Resources/" | |
| <string>loco_icon.png</string> | |
| </dict> | |
| </plist> | |
| EOF | |
| if [ -f "Gui/Assets/loco_icon.png" ]; then | |
| cp "Gui/Assets/loco_icon.png" "$macos_bundle_dir/Contents/Resources/" |
No description provided.